package com.smm.web.vmc.domain;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by zhenghao on 2016/8/26.
 * 摄像头对象
 */
@Entity
@Table(name="camera")
public class Camera implements Serializable {


    private int id;

    private String name;

    private String ip;

    private int webPort;        //web 访问端口

    private int severPort;      //程序控制端口

    private String account;     //访问账号

    private String password;    //访问密码

    private String coverImageUrl;   //封面图片访问路径

    private String serialNumber;    //海康设备序列号。 摄像头背面二维码下数字

    private String m3u8;    //萤石云设备直播地址（海康摄像头注册萤石云服务后生成）

    private Warehouse warehouse;    //所属仓库


    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public int getWebPort() {
        return webPort;
    }

    public void setWebPort(int webPort) {
        this.webPort = webPort;
    }

    public int getSeverPort() {
        return severPort;
    }

    public void setSeverPort(int severPort) {
        this.severPort = severPort;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getCoverImageUrl() {
        return coverImageUrl;
    }

    public void setCoverImageUrl(String coverImageUrl) {
        this.coverImageUrl = coverImageUrl;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    public String getM3u8() {
        return m3u8;
    }

    public void setM3u8(String m3u8) {
        this.m3u8 = m3u8;
    }

    @ManyToOne
    @JoinColumn(name ="warehouse_id")
    public Warehouse getWarehouse() {
        return warehouse;
    }

    public void setWarehouse(Warehouse warehouse) {
        this.warehouse = warehouse;
    }
}
